﻿Public Class reporte

    Private Sub reporte_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        'Me.ReportViewer1.RefreshReport()
    End Sub
    Public Sub carga_info(ByVal qry As String, ByRef rp As Object)
        ' Dim rp As New CrystalReport1
        Dim data As New DataSet
        Consulta(qry, data)
        rp.SetDataSource(data.Tables("data"))
        'MsgBox(data.Tables("data").Rows.Count)
        CrystalReportViewer1.ReportSource = rp
        CrystalReportViewer1.PrintReport()
    End Sub

    Private Sub CrystalReportViewer1_Load(sender As System.Object, e As System.EventArgs) Handles CrystalReportViewer1.Load

    End Sub
End Class